﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PlanoAulaHelper
{
    public class PlanoAula : IComparable
    {
        string descricao;

        public string Descricao
        {
            get { return descricao; }
            set { descricao = value; }
        }
        string referencias;

        public string Referencias
        {
            get { return referencias; }
            set { referencias = value; }
        }
        DateTime data;

        public DateTime Data
        {
            get { return data; }
            set { data = value; }
        }
        public override bool Equals(object obj)
        {
            if ( obj is PlanoAula )
                return this.Data.Date == ((PlanoAula)obj).Data.Date;
            return false;

        }

        #region IComparable Members

        public int CompareTo(object obj)
        {
            if (obj is PlanoAula)
                return this.Data.Date.CompareTo( ((PlanoAula)obj).Data.Date) ;
            return -1;
        }

        #endregion

        public override int GetHashCode()
        {
            return this.Data.Date.GetHashCode();
        }
    }
}
